#ifndef PARSER_H
#define PARSER_H

#include "dom.h"
#include <iksemel.h>
#include <boost/shared_ptr.hpp>
#include <string>

using namespace std;

namespace model {
	/**
	 * This class wrappes the iksemel-struct "iksparser", which 
	 * holds all xml-parsing-informations
	 * \author Michael Opitz <opitz.michael@gmail.com>
	 * \version 0.1
	 */
	template <class parser_pol>
	class parser : public parser_pol {
	public:
		/**
		 * Does basically nothing.
		 */
		parser();
		/**
		 * Does basically nothing.
		 */
		~parser();

		/**
		 * parses the passed string.
		 * \param str is the string, which should be parsed.
		 * \return true if it was successfull.
		 */
		bool parse(const string &str);
	private:
		/**
		 * Stores the underlying iksparser*-object which is wrapped.
		 */
		iksparser *iks_parser;
	};
}
#include "parser.tpl"
#endif
